#pragma once
/***********************************************************
! @File        : transtext.h
 *  @Brief       : cpp翻译文案
 *  @Details     : 使用方法 TransString::instance()->helloWord;
 *  @Author      : soda
 *  @Date        : 2023-08-10 15:50:01
 *  @Version     : v1.0
 *  @Copyright   : Copyright By soda, All Rights Reserved
 ***********************************************************/

#include <QObject>
#include <QDebug>

class TransString : public QObject
{
	Q_OBJECT
public:
    static TransString* instance() {
        if( m_trans == nullptr ){
            m_trans = new TransString();
        }
        return m_trans;
    }

    void retranslate(){

        uninstallStart = tr("Are you sure want to uninstall XXX ?");    /// 你想要卸载 XXX ?
        uninstalling = tr("Uninstalling XXX ...");                                  /// 卸载 XXX ...
        uninstallEnd = tr("XXX  has been uninstalled.");                     /// XXX 已经被卸载.
        uninstallError1 = tr("XXX  uninstall complete.");                     /// XXX 卸载完成.
        uninstallError2 = tr("Some elements could not be removed.These can be removed manually.");                     /// 无法删除某些元素,这些可以手动移除.
        uninstallOK = tr("OK");                     /// 确认
        uninstallCancel = tr("Cancel");                     /// 取消
        uninstallComplete = tr("Complete");                     /// 完成
        uninstallRunning = tr("The program is running, please close it first and try again.");                     /// 程序正在运行，请关闭重试。
        uninstallTitle = tr("Uninstall");                     /// 程序正在运行，请关闭重试。
    }

private:
    TransString(){ retranslate(); }
    static TransString *m_trans;

public:
    QString uninstallStart;
    QString uninstalling;
    QString uninstallEnd;
    QString uninstallError1;
    QString uninstallError2;
    QString uninstallOK;
    QString uninstallCancel;
    QString uninstallComplete;
    QString uninstallRunning;
    QString uninstallTitle;
};
